<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('mobile',20)->unique()->comment('手机号码');
            $table->string('name',20)->comment('昵称');
            $table->string('password')->default('')->comment('密码');
            $table->string('shopid')->default('')->comment('商家id');
            $table->tinyInteger('status')->default(1)->comment('状态');
            $table->string('auth', 512)->nullable()->comment('权限列表');
            $table->dateTime('logintime')->comment('最后登录时间');
            $table->string('remember_token')->default('')->comment('token');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('shop_users');
    }
}
